﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="DailyFinancialDetailsQuery.aspx.cs" Inherits="NetDon.OA.Portal.Finance.DailyFinancialDetailsQuery" %>

<%@ Import Namespace="NetDon.OA.Interface" %>
<%@ Import Namespace="NetDon.OA.Portal" %>
<%@ Import Namespace="NetDon.Utilities" %>
<%@ Register Src="../Controls/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanelFlow" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearch">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <NetDon:FormPanel ID="PanelCondition" runat="server" CaptionAlign="NotSet" RepeatColumns="3">
                                <Items>
                                    <NetDon:FormItem HeaderText="付款或收入日期">
                                        <ContentTemplate>
                                            <asp:TextBox ID="txtPaymentOrIncomeDateStart" runat="server" Width="75px"></asp:TextBox>
                                            <asp:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True" TargetControlID="txtPaymentOrIncomeDateStart" Format="yyyy-MM-dd">
                                            </asp:CalendarExtender>
                                            <asp:Label ID="Label1" runat="server" Text="~" Style="margin-left: 5px; margin-right: 6px"></asp:Label>
                                            <asp:TextBox ID="txtPaymentOrIncomeDateEnd" runat="server" Width="75px"></asp:TextBox>
                                            <asp:CalendarExtender ID="CalendarExtender2" runat="server" Enabled="True" TargetControlID="txtPaymentOrIncomeDateEnd" Format="yyyy-MM-dd">
                                            </asp:CalendarExtender>
                                        </ContentTemplate>
                                    </NetDon:FormItem>
                                                                        <NetDon:FormItem HeaderText="承运公司">
                                        <ContentTemplate>
                                            <asp:DropDownList ID="ddlCompany" runat="server" DataSourceID="ObjectDataSourceCompany"
                                                DataTextField="CompanyName" DataValueField="CompanyId" AppendDataBoundItems="true">
                                            </asp:DropDownList>
                                            <asp:ObjectDataSource ID="ObjectDataSourceCompany" runat="server" OldValuesParameterFormatString="original_{0}"
                                                SelectMethod="RetrieveCompanies" TypeName="NetDon.OA.Business.MiscDataSource">
                                            </asp:ObjectDataSource>
                                        </ContentTemplate>
                                    </NetDon:FormItem>
                                </Items>
                            </NetDon:FormPanel>
                        </td>
                        <td valign="bottom">
                            <asp:Button ID="btnSearch" SkinID="Button60" runat="server" OnClick="btnSearch_Click"
                                Text="查询"></asp:Button>
                            <asp:Button ID="btnReload" runat="server" SkinID="Hidden" OnClick="btnReload_Click" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <div style="margin-top: 10px">
                <NetDon:GridView ID="gridOrderList" runat="server" AutoGenerateColumns="False" AllowSorting="False">
                    <Columns>
                        <NetDon:BoundField HeaderText="订单编号" DataField="OrderCode">
                        </NetDon:BoundField>
                        <NetDon:BoundField HeaderText="运输计划号" DataField="TransportationPlanCode">
                        </NetDon:BoundField>
                        <asp:BoundField HeaderText="付款或收入日期" DataField="PaymentOrIncomeDate" DataFormatString="{0:yyyy-MM-dd}">
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="收入或支出">
                            <ItemTemplate>
                                <%#EnumUtilities.GetDescription((MachineAccountType)Enum.Parse(typeof(MachineAccountType), Eval("PaymentOrIncome").ToString()))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="收入方式">
                            <ItemTemplate>
                                <%#GetDictionaryItemName(Eval("IncomeType"))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="收入(￥)">
                            <ItemTemplate>
                                <%#! MiscUtilities.IsNullOrEmpty(Eval("IncomeAmount")) ? ((Decimal)Eval("IncomeAmount")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="其它收入(￥)">
                            <ItemTemplate>
                                <%#! MiscUtilities.IsNullOrEmpty(Eval("OtherIncome")) ? ((Decimal)Eval("OtherIncome")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="应付运费（成本）(￥)">
                            <ItemTemplate>
                                <%#! MiscUtilities.IsNullOrEmpty(Eval("DueShippingCost")) ? ((Decimal)Eval("DueShippingCost")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="已付运费(￥)">
                            <ItemTemplate>
                                <%#! MiscUtilities.IsNullOrEmpty(Eval("PaidShippingCost")) ? ((Decimal)Eval("PaidShippingCost")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="待付运费(￥)">
                            <ItemTemplate>
                                <%#! MiscUtilities.IsNullOrEmpty(Eval("PendingShippingCost")) ? ((Decimal)Eval("PendingShippingCost")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="支出金额(￥)">
                            <ItemTemplate>
                                <%#!MiscUtilities.IsNullOrEmpty(Eval("TobePaidShippingCost")) ? ((Decimal)Eval("TobePaidShippingCost")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="装卸费(￥)">
                            <ItemTemplate>
                                <%#!MiscUtilities.IsNullOrEmpty(Eval("GoodsUnloadingCost")) ? ((Decimal)Eval("GoodsUnloadingCost")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="工厂扣罚(￥)">
                            <ItemTemplate>
                                <%#!MiscUtilities.IsNullOrEmpty(Eval("OtherAmountFromManufactor")) ? ((Decimal)Eval("OtherAmountFromManufactor")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="付款方式" SortExpression="PaymentMethod">
                            <ItemTemplate>
                                <%#!MiscUtilities.IsNullOrEmpty(Eval("PaymentMethod")) ? GetDictionaryItemName(Eval("PaymentMethod")) : string.Empty%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="扣款金额(￥)">
                            <ItemTemplate>
                                <%#! MiscUtilities.IsNullOrEmpty(Eval("DeductionExceptionsAmount")) ? ((Decimal)Eval("DeductionExceptionsAmount")).ToString("#,###.00") : ""%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right"></ItemStyle>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="test" />
                    <RowStyle CssClass="test" />
                    <AlternatingRowStyle CssClass="GridRow1" />
                </NetDon:GridView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
